home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 008 / egaprob.arc / EGA-PROB.TXT next >
Encoding:
Text File  |  1987-03-13  |  5.1 KB  |  141 lines

  1. subject: A Tool for Resolving Problems           date: November 18, 1986
  2.          with EGA Software Run on PC6300
  3.  
  4.  
  5.  
  6.                        ABSTRACT
  7.  
  8.                                 
  9. A tool and technique is presented to aid in resolving
  10. the cause of failures of some software when run on a PC
  11. 6300 equipped with an Enhanced Graphics Adapter (EGA).
  12. This method is relatively easy and quick and valuable
  13. when it is suspected that the failure may be caused by
  14. OUT-word instructions.  It is well known that the Bus
  15. Converter circuit on the Bus Expansion board of the PC
  16. 6300 sends out the two bytes of a word to the 8-bit
  17. bus in a sequence (high byte first to the high
  18. address) opposite to that done by the IBM PC XT.
  19. Although normally this is not a problem, it could be
  20. for some boards like EGA.
  21.  
  22.                   MEMORANDUM FOR FILE
  23.  
  24. 1.0  Introduction
  25.  
  26.           The purpose of this memorandum is to discuss
  27. the use of a technique for easily verifying whether
  28. the PC 6300 Bus Converter is causing some observed EGA
  29. software failures.
  30.  
  31.  
  32. 2.0  Background
  33.  
  34.           Periodically software packages are found that
  35. are designed to run with EGA but will not operate
  36. properly on a PC 6300 equipped with EGA. It is very
  37. often suspected that the cause is the Bus Converter
  38. circuit. *This circuit, which is part of the Bus
  39. expansion board, performs the required 16-bit to 8-bit
  40. bus conversions,  When doing the 16-to-8 conversion,
  41. for example, it sends out the high address before it
  42. sends out the high byte to the high address before it
  43. sends out the low byte to the low address.  This is
  44. opposite in sequence to what the IBM PC XT does.  This
  45. difference normally is not a problem because most
  46. boards on the 8-bit bus are not dependent on byte
  47. sequence.  However, it is often important for boards
  48. like the Color Graphics Adapter (CGA) and the EGA. 
  49. 3.0  Problem
  50.  
  51.           Since the extent to which a particular
  52. software package uses OUT instructions that are word
  53. instead of byte oriented is not known, the exact cause
  54. of the failure is usually not known for certain and the
  55. amount of effort needed tko fix the problem is also
  56. uncertain.  This situation leads to long delays in
  57. resolving these failures.  These problems come to the
  58. attention of a variety of people including developers,
  59. system testers, HOTLINE, product management, etc.  Yet,
  60. patching the executable file of some unfamiliar piece
  61. of software is usually best left to an expert.
  62.  
  63. 4.0  Solution
  64.  
  65.           A simple technique has been used successfully
  66. to quickly patch an otherwise unfamiliar program
  67. suspected of suffering from the OUT-word problem. 
  68. Although there are several types of OUT instructions,
  69. the "OUT DX, AX" instruction is very popular.  It is a
  70. single byte instruction with opcode "EF". By using the
  71. DEBUG program, all occurrences of these OUT-word
  72. instructions can be found. By replacing all of these
  73. "EF" opcodes with the single byte "INT 3"
  74. instruction with opcode "CC", a short program can be
  75. substituted for every occurrence of these OUT-word
  76. instructions. The program uses OUT-byte instructions
  77. and sends out the two bytes in the correct order. 
  78. Since the program is driven by an interrupt, it can be
  79. installed and make resident separately while the
  80. application program is patched simply by single byte
  81. substitutions.  This method, of course, can be extended
  82. to other OUT instructions.  The use of INT 3 is very
  83. convenient but precludes use of the DEBUG program on
  84. the patched application program because it also uses
  85. INT 3.  This method is meant only as a temporary quick
  86. fix and not a final patch.
  87.  
  88. 5.0  Implementation
  89.  
  90.           1) Install the patches on a backup copy of
  91. the application program (e.g., xyz) by the following
  92. sequence of commands:
  93.  
  94.          copy xyz.exe xyz.tmp
  95.          debug xyz.tmp < xyz.fix 
  96.          rename xyz.tmp xyz.exe
  97.  
  98.     If already available,
  99.     xyz.fix contains the editing script for DEBUG.
  100.     If not available, do the debug manually.
  101.  
  102.  NOTE: DO NOT PERFORM THIS PATCH ON YOUR
  103.        ORIGINAL COPY OF XYZ.EXE;USE ONLY A BACKUP
  104.        COPY.
  105.  
  106.           2) Whenever running the xyz program, first
  107. run outfix.com to make the INT 3 program resident by the
  108. following sequence of commands:
  109.  
  110.                  outfix
  111.                  xyz
  112.  
  113.            See Appendix A for outfix.com
  114.  
  115. Appendix B shows, as an example, the word.fix file to
  116. patch MS-WORD. (As an exercise try fixing LEARN, which
  117. also needs to be patched.  See Appendix B.)
  118.  
  119. Appendix C shows, as another example, the egapaint.fix
  120. file to patch EGAPAINT.
  121.  
  122. Appendix D shows, as a final example, the mona.fix file
  123. to patch the MONA demonstration program.
  124.  
  125. 6.0  Conclusion
  126.  
  127.           A useful technique has been demonstrated for
  128. quickly patching application software which previously
  129. had problems running on a PC 6300 equipped with EGA.
  130.  
  131. *********************************************************************
  132.  
  133. Note: See the appended files which are identified as follows in the text:
  134.  
  135. Appendix A = OUTFIX.ASM
  136. Appendix B = WORD.FIX
  137.            = LEARN.FIX
  138. Appendix C = EGAPAINT.FIX
  139. Appendix D = MONA.FIX
  140.  
  141.